from TbApi import TbApi
from HttpClient import HttpClient
from AEProxy import AELog, AEHttp
from Log import Log
from TbDomain import TbUser


## replace with your app secret and app key
Log.enableDebug = True
api = TbApi('http://sipdev.alisoft.com/sip/rest', '2332',  '32b52e901ffb11dd88b6f0a50cc8990b')
api.httpClient = HttpClient()

## call user.get
fields = 'nick,location.city'
user =  api.getUser(None, fields)
Log.debug(user.__class__)
if(user.__class__== TbUser):
	print user.nick
else:
	print  user

